package ee.fujitsu.entity.state;
import java.util.Date;
import java.util.Map;

import ee.fujitsu.entity.Customer;
import ee.fujitsu.entity.JournalRecord;
import ee.fujitsu.entity.Movie;


/**
 * The Interface State.
 *
 * @author Andrei
 * 
 * 10.09.2012
 * interface for possible Film state changes
 */
public interface State {
	
	/**
	 * Rent film.
	 *
	 * @param moviesStore the movies store
	 * @param moviesRent the movies rent
	 * @param startDate the start date
	 * @param expectedEnd the expected end
	 * @param realEnd the real end
	 * @param client the client
	 * @param bonus the bonus
	 * @return the journal record
	 */
	JournalRecord rentFilm(Map<Integer, Movie> moviesStore,
			Map<Integer, Movie> moviesRent,
			Date startDate,
			Date expectedEnd,
			Date realEnd,
			Customer client,
			boolean bonus);
	
	/**
	 * Delete film.
	 *
	 * @param moviesStore the movies store
	 * @param moviesDeleted the movies deleted
	 * @param index the index
	 * @return true, if successful
	 */
	boolean deleteFilm( Map<Integer, Movie> moviesStore, Map<Integer, Movie> moviesDeleted, int index);
	
	/**
	 * Adds the film.
	 *
	 * @param movies the movies
	 * @return true, if successful
	 */
	boolean addFilm(Map<Integer, Movie> movies);
	
	/**
	 * Return film.
	 *
	 * @param moviesStore the movies store
	 * @param moviesRent the movies rent
	 */
	void returnFilm(Map<Integer, Movie> moviesStore, Map<Integer, Movie> moviesRent);	
	
	/**
	 * Change film.
	 *
	 * @param movies the movies
	 * @param index the index
	 * @return true, if successful
	 */
	boolean changeFilm(Map<Integer, Movie> movies, int index);

}
